package aop.recipe.model;

import java.sql.SQLException;
import java.util.HashMap;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;

@Repository
public class ReportDao {
	@Resource(name="sqlMapClient")
	private SqlMapClient sqlMapClient;

	public void addRankingRecipe(ReportVO vo) throws SQLException{
		sqlMapClient.insert("report.addRankingRecipe",vo);
	}
	public int RankingRecipeCheckByNo(HashMap map) throws SQLException{
		return (Integer) sqlMapClient.queryForObject("report.rankingRecipeCheckByNo",map);
	}
	public void updateRankingRecipeCount(int r_no) throws SQLException{
		sqlMapClient.update("report.updateRankingRecipeCount",r_no);
	}
	public String getRankingDate() throws SQLException{
		return (String) sqlMapClient.queryForObject("report.getRankingDate");
	}
	public int rankingRecipeCheckByWord(HashMap hmap) throws SQLException{
		return (Integer) sqlMapClient.queryForObject("report.rankingRecipeCheckByWord",hmap);
	}
	public void updateRankingRecipeCountByWord(HashMap hmap) throws SQLException{
		sqlMapClient.update("report.updateRankingRecipeCountByWord",hmap);
	}
	
}
